<!DOCTYPE html>
<html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>理财产品排名</title>
    <meta name="description" content="Neat">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" user-scalable="no">
    <link rel="stylesheet" th:href="@{/css/product/style.css}">
    <script th:src="@{/js/jquery.min.js}"></script>
</head>
<body>
<div class="main-group">
    <h2 class="ranking-title">
        <p class="title">可贷产品列表</p>
        <p class="brand"></p>
        <p class="desc">CONSIDER</p>
    </h2>
    <div class="ranking-nav-group">
        <div class="self">全部</div>
        <div>年利率</div>
        <div>可贷款额度</div>
    </div>
    <div class="items-box-group">

        <ul class="items-group" th:each="products : ${product}">
            <li class="item-group">
                <div class="img">1</div>
                <div class="item-data">
                    <h3 class="title" th:text="${products.name}"></h3>
                    <div class="item-price">

                        <div>

                            <p></p>
                        </div>

                        <div>
                            <span th:text="${products.getRate()}"></span>
                            <span></span>
                            <p></p>
                        </div>

                        <div >
                            <span th:text="${products.getMaxMoney()}"></span>
                            <span>元</span>
                            <p></p>
                        </div>
                    </div>
                </div>
                <div class="buttin-group"><a href="#">去申请贷款</a></div>
            </li>

        </ul>


    </div>
</div>

<script type="text/javascript">
    function tap_fun(parameter) {
        this._nav_items = parameter.nav_items;
        this._nav_self_class = parameter.nav_self_class;
        this._items_box = parameter.items_box;
        this._info();
    }

    tap_fun.prototype = {
        _info: function () {
            let that = this;
            this._nav_items.click(function () {
                let idx = $(this).index();
                that._nav_items.attr('class', '');
                $(this).attr('class', that._nav_self_class);
                that._items_box.hide();
                that._items_box.eq(idx).show();
            })
        }
    }

    new tap_fun({
        nav_items: $('.ranking-nav-group div'),
        nav_self_class: 'self',
        items_box: $('.items-box-group .items-group')
    });
</script>

</body>
</html>